#include <stdio.h>

#define SEC_PER_MIN 60 // 1分钟60秒

int main(void)
{
    printf("\n");
    int sec, min, left;
    printf("Convert seconds to minutes and seconds!\n");
    sec = 1;
    while (sec > 0)
    {
        printf("Enter next value ( <= 0 to quit):\n");
        scanf("%d", &sec);
        min = sec / SEC_PER_MIN;  // 截断分钟数
        left = sec % SEC_PER_MIN; // 剩下的秒数
        printf("%d seconds is %d minutes, %d seconds.\n", sec, min, left);
    }
    printf("Done!\n");
    return 0;
}